; Improve doc string of 'insert-char'
authorEli Zaretskii <eliz@gnu.org>
Fri, 18 Apr 2025 11:10:19 +0000 (14:10 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 18 Apr 2025 11:10:19 +0000 (14:10 +0300)
* src/editfns.c (Finsert_char): Doc fix.  Suggested by Lactose ‎
<lactose@allthingslinux.org> (bug#77889).

src/editfns.c

index ecc16a62f768563fa3a11990472f2012afc96920..a3f220671a8898d4a48bacb7a20beebc7eb5e5d4 100644 (file)
@@ -1440,8 +1440,9 @@ DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3,
               (prefix-numeric-value current-prefix-arg)\
               t))",
        doc: /* Insert COUNT copies of CHARACTER.
+
 Interactively, prompt for CHARACTER using `read-char-by-name'.
-You can specify CHARACTER in one of these ways:
+You can specify CHARACTER at the prompt in one of these ways:
 
  - As its Unicode character name, e.g. \"LATIN SMALL LETTER A\".
    Completion is available; if you type a substring of the name
@@ -1455,14 +1456,18 @@ You can specify CHARACTER in one of these ways:
  - As a code point with a radix specified with #, e.g. #o21430
    (octal), #x2318 (hex), or #10r8984 (decimal).
 
-If called interactively, COUNT is given by the prefix argument.  If
-omitted or nil, it defaults to 1.
+When called from Lisp, CHARACTER should be an integer whose value
+is valid for a character; see `characterp'.  To specify a character by
+its Unicode name in calls from Lisp, use `char-from-name'.
+
+When called interactively, COUNT is the prefix argument.  If omitted or
+nil, it defaults to 1.
 
 Inserting the character(s) relocates point and before-insertion
 markers in the same ways as the function `insert'.
 
 The optional third argument INHERIT, if non-nil, says to inherit text
-properties from adjoining text, if those properties are sticky.  If
+properties from adjoining text, if those properties are sticky.  When
 called interactively, INHERIT is t.  */)
   (Lisp_Object character, Lisp_Object count, Lisp_Object inherit)
 {